<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>教材版本与知识点关联管理</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>

    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                        renjiao: '#4E72B7',
                        sujiao: '#E4A12D',
                        beishida: '#55A954',
                        hukejiao: '#C45A5A',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>

    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .tree-line {
                @apply border-l-2 border-dashed border-gray-200 ml-3 pl-4;
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏（统一风格） -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <button id="sidebar-toggle" class="lg:hidden text-gray-500 hover:text-primary transition-colors">
                    <i class="fa fa-bars text-xl"></i>
                </button>
                <h1 class="text-xl font-bold text-primary flex items-center">
                    <i class="fa fa-book mr-2"></i>
                    <span>睿途题库</span>
                </h1>
            </div>

            <div class="hidden md:flex items-center space-x-6">
                <!-- 控制面板 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-tachometer mr-1"></i> 控制面板
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-dashboard mr-2"></i> 仪表盘
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-line mr-2"></i> 数据概览
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-tasks mr-2"></i> 任务管理
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 教材管理 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 font-medium border-b-2 border-primary pb-1 flex items-center">
                        <i class="fa fa-book mr-1"></i> 教材管理
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-list mr-2"></i> 版本管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-sitemap mr-2"></i> 章节管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-lightbulb-o mr-2"></i> 知识点管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-primary bg-primary/10 font-medium">
                                <i class="fa fa-exchange mr-2"></i> 版本对比
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 题库管理 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-database mr-1"></i> 题库管理
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-question-circle mr-2"></i> 题目管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-tags mr-2"></i> 标签管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-filter mr-2"></i> 筛选规则
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-upload mr-2"></i> 批量导入
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 组卷系统 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-files-o mr-1"></i> 组卷系统
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-magic mr-2"></i> 智能组卷
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-edit mr-2"></i> 手动组卷
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-copy mr-2"></i> 试卷模板
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-history mr-2"></i> 历史试卷
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 数据分析 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-bar-chart mr-1"></i> 数据分析
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-pie mr-2"></i> 学习分析
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-bar mr-2"></i> 成绩统计
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-line mr-2"></i> 趋势分析
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-file-text mr-2"></i> 报告生成
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 系统设置 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-cog mr-1"></i> 系统设置
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-users mr-2"></i> 用户管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-shield mr-2"></i> 权限设置
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-database mr-2"></i> 数据备份
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-cogs mr-2"></i> 系统配置
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="flex items-center space-x-4">
                <div class="relative">
                    <input type="text" placeholder="搜索教材、章节或知识点..."
                           class="pl-10 pr-4 py-2 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all w-40 lg:w-64">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>

                <div class="relative">
                    <button class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-bell text-xl"></i>
                        <span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                    </button>
                </div>

                <div class="flex items-center space-x-2 cursor-pointer group">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-transparent group-hover:border-primary transition-all">
                    <span class="hidden md:inline font-medium">张老师</span>
                    <i class="fa fa-angle-down text-gray-400 group-hover:text-primary transition-colors"></i>
                </div>
            </div>
        </div>
    </header>

    <div class="flex flex-1 overflow-hidden">
        <!-- 左侧边栏 - 教材版本与章节导航 -->
        <aside id="sidebar" class="w-75 bg-white shadow-md transform -translate-x-full lg:translate-x-0 fixed lg:static h-full z-40 transition-transform duration-300 ease-in-out overflow-y-auto scrollbar-hide">
            <div class="p-4 border-b">
                <div class="flex items-center justify-between mb-3">
                    <h2 class="font-bold text-lg">教材版本导航</h2>
                    <div class="relative">
                        <select class="appearance-none bg-gray-100 rounded-lg px-3 py-1 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option>全部学科</option>
                            <option>数学</option>
                            <option>物理</option>
                            <option>化学</option>
                            <option>生物</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>

                <div class="relative">
                    <input type="text" placeholder="搜索章节..."
                           class="w-full pl-8 pr-4 py-2 rounded-lg bg-gray-100 focus:outline-none focus:ring-1 focus:ring-primary">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>
            </div>

            <!-- 教材版本选择 -->
            <div class="p-4 border-b">
                <h3 class="font-medium text-sm text-gray-500 mb-2">选择教材版本</h3>
                <div class="space-y-2">
                    <div class="relative">
                        <select id="version-selector" class="w-full appearance-none bg-gray-100 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-1 focus:ring-primary">
                            <option value="RJ-2023">人教版 2023版</option>
                            <option value="SX-2022">苏教版 2022版</option>
                            <option value="BS-2023">北师大版 2023版</option>
                            <option value="HK-2024">沪科版 2024版</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>

                    <div class="flex space-x-2 mt-2">
                        <button class="text-xs bg-primary/10 text-primary px-3 py-1 rounded-lg hover:bg-primary/20 transition-colors flex-1">
                            <i class="fa fa-plus mr-1"></i> 添加新版本
                        </button>
                        <button class="text-xs bg-gray-100 text-gray-600 px-3 py-1 rounded-lg hover:bg-gray-200 transition-colors">
                            <i class="fa fa-refresh mr-1"></i> 同步
                        </button>
                    </div>
                </div>
            </div>

            <!-- 章节树形导航 -->
            <div class="p-4">
                <div class="flex items-center justify-between mb-3">
                    <h3 class="font-medium text-sm text-gray-500">章节结构</h3>
                    <div class="flex space-x-1">
                        <button id="expand-all" class="text-xs text-gray-500 hover:text-primary">展开</button>
                        <span class="text-gray-300">|</span>
                        <button id="collapse-all" class="text-xs text-gray-500 hover:text-primary">收起</button>
                    </div>
                </div>

                <div class="space-y-1">
                    <!-- 章节1 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span class="font-medium">第一章 集合与常用逻辑用语</span>
                            </div>
                            <i class="fa fa-angle-down text-gray-400 transition-transform"></i>
                        </div>

                        <div class="pl-6 mt-1 space-y-1">
                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>1.1 集合的含义与表示</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">4课时</span>
                                </div>

                                <div class="pl-6 mt-1 space-y-1 tree-line">
                                    <div class="knowledge-item bg-primary/5 border-l-2 border-primary p-2 rounded-r-lg cursor-pointer hover:bg-primary/10 transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                                <span>集合的定义</span>
                                            </div>
                                            <span class="text-xs text-gray-500">3题</span>
                                        </div>
                                    </div>

                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>集合的表示方法</span>
                                            </div>
                                            <span class="text-xs text-gray-500">5题</span>
                                        </div>
                                    </div>

                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>元素与集合的关系</span>
                                            </div>
                                            <span class="text-xs text-gray-500">4题</span>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>1.2 集合间的基本关系</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">3课时</span>
                                </div>

                                <div class="pl-6 mt-1 space-y-1 tree-line hidden">
                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>子集与真子集</span>
                                            </div>
                                            <span class="text-xs text-gray-500">6题</span>
                                        </div>
                                    </div>

                                    <div class="knowledge-item hover:bg-gray-50 p-2 rounded-lg cursor-pointer transition-colors">
                                        <div class="flex items-center justify-between">
                                            <div class="flex items-center">
                                                <i class="fa fa-dot-circle-o text-gray-400 mr-2"></i>
                                                <span>集合相等</span>
                                            </div>
                                            <span class="text-xs text-gray-500">2题</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 章节2 -->
                    <div class="chapter-item">
                        <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                            <div class="flex items-center">
                                <i class="fa fa-book text-primary mr-2"></i>
                                <span>第二章 一元二次函数、方程和不等式</span>
                            </div>
                            <i class="fa fa-angle-right text-gray-400 transition-transform"></i>
                        </div>

                        <div class="pl-6 mt-1 space-y-1 hidden">
                            <div class="section-item">
                                <div class="flex items-center justify-between cursor-pointer hover:bg-gray-50 rounded-lg p-2 transition-colors">
                                    <div class="flex items-center">
                                        <i class="fa fa-bookmark-o text-secondary mr-2"></i>
                                        <span>2.1 等式性质与不等式性质</span>
                                    </div>
                                    <span class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">2课时</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </aside>

        <!-- 主内容区域 -->
        <main class="flex-1 overflow-y-auto">
            <!-- 面包屑导航 -->
            <div class="bg-white border-b px-6 py-3">
                <nav class="flex items-center space-x-2 text-sm text-gray-500">
                    <a href="#" class="hover:text-primary transition-colors">首页</a>
                    <i class="fa fa-angle-right text-gray-300"></i>
                    <a href="#" class="hover:text-primary transition-colors">教材管理</a>
                    <i class="fa fa-angle-right text-gray-300"></i>
                    <a href="#" class="hover:text-primary transition-colors">人教版 2023版</a>
                    <i class="fa fa-angle-right text-gray-300"></i>
                    <span class="text-gray-800 font-medium">集合的定义</span>
                </nav>
            </div>

            <!-- 页面标题和操作 -->
            <div class="bg-white border-b px-6 py-4">
                <div class="flex items-center justify-between">
                    <div>
                        <h1 class="text-2xl font-bold text-gray-800 mb-2">集合的定义</h1>
                        <p class="text-gray-600">第一章 集合与常用逻辑用语 · 1.1 集合的含义与表示</p>
                    </div>
                    <div class="flex items-center space-x-3">
                        <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                            <i class="fa fa-edit mr-2"></i> 编辑知识点
                        </button>
                        <button class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors flex items-center">
                            <i class="fa fa-share mr-2"></i> 分享
                        </button>
                    </div>
                </div>
            </div>

            <!-- 主要内容区域 -->
            <div class="p-6">
                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                    <!-- 左侧：知识点详情 -->
                    <div class="lg:col-span-2 space-y-6">
                        <!-- 知识点基本信息 -->
                        <div class="bg-white rounded-lg shadow-sm border p-6">
                            <div class="flex items-center justify-between mb-4">
                                <h2 class="text-xl font-bold text-gray-800">知识点详情</h2>
                                <div class="flex items-center space-x-2">
                                    <span class="text-xs bg-green-100 text-green-600 px-2 py-1 rounded-full">已启用</span>
                                    <button class="text-gray-400 hover:text-gray-600 transition-colors">
                                        <i class="fa fa-ellipsis-h"></i>
                                    </button>
                                </div>
                            </div>

                            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                                <div>
                                    <h3 class="font-medium text-gray-700 mb-3">基本信息</h3>
                                    <div class="space-y-3">
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">知识点名称</span>
                                            <span class="font-medium">集合的定义</span>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">所属章节</span>
                                            <span class="font-medium">1.1 集合的含义与表示</span>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">难度等级</span>
                                            <span class="text-sm bg-blue-100 text-blue-600 px-2 py-1 rounded-full">基础</span>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">创建时间</span>
                                            <span class="text-sm text-gray-600">2024-01-15</span>
                                        </div>
                                    </div>
                                </div>

                                <div>
                                    <h3 class="font-medium text-gray-700 mb-3">关联信息</h3>
                                    <div class="space-y-3">
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">关联题目</span>
                                            <span class="font-medium text-primary">3题</span>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">关联资源</span>
                                            <span class="font-medium text-primary">2个</span>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">学习人数</span>
                                            <span class="font-medium">1,234</span>
                                        </div>
                                        <div class="flex items-center justify-between">
                                            <span class="text-gray-500">掌握率</span>
                                            <span class="font-medium text-green-600">85%</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 知识点描述 -->
                        <div class="bg-white rounded-lg shadow-sm border p-6">
                            <h2 class="text-xl font-bold text-gray-800 mb-4">知识点描述</h2>
                            <div class="prose max-w-none">
                                <p class="text-gray-700 leading-relaxed mb-4">
                                    集合是数学中的一个基本概念，它是由一些确定的、不同的对象组成的整体，这些对象称为该集合的元素。
                                </p>
                                <p class="text-gray-700 leading-relaxed mb-4">
                                    集合具有以下特征：
                                </p>
                                <ul class="list-disc list-inside text-gray-700 space-y-2 mb-4">
                                    <li>确定性：集合中的元素是确定的</li>
                                    <li>互异性：集合中的元素互不相同</li>
                                    <li>无序性：集合中元素的排列顺序无关紧要</li>
                                </ul>
                                <p class="text-gray-700 leading-relaxed">
                                    集合通常用大写字母表示，如A、B、C等，元素用小写字母表示，如a、b、c等。
                                </p>
                            </div>
                        </div>

                        <!-- 关联题目 -->
                        <div class="bg-white rounded-lg shadow-sm border p-6">
                            <div class="flex items-center justify-between mb-4">
                                <h2 class="text-xl font-bold text-gray-800">关联题目</h2>
                                <button class="text-primary hover:text-primary/80 transition-colors flex items-center">
                                    <i class="fa fa-plus mr-1"></i> 添加题目
                                </button>
                            </div>

                            <div class="space-y-4">
                                <div class="border rounded-lg p-4 hover:bg-gray-50 transition-colors">
                                    <div class="flex items-start justify-between">
                                        <div class="flex-1">
                                            <div class="flex items-center space-x-2 mb-2">
                                                <span class="text-xs bg-blue-100 text-blue-600 px-2 py-1 rounded-full">选择题</span>
                                                <span class="text-xs bg-green-100 text-green-600 px-2 py-1 rounded-full">基础</span>
                                            </div>
                                            <p class="text-gray-800 mb-2">下列哪个选项正确描述了集合的特征？</p>
                                            <div class="text-sm text-gray-600 space-y-1">
                                                <div>A. 集合中的元素可以重复</div>
                                                <div>B. 集合中的元素顺序很重要</div>
                                                <div>C. 集合中的元素是确定的、互不相同的</div>
                                                <div>D. 集合可以是空的</div>
                                            </div>
                                        </div>
                                        <div class="flex items-center space-x-2 ml-4">
                                            <span class="text-xs text-gray-500">正确率: 92%</span>
                                            <button class="text-gray-400 hover:text-gray-600 transition-colors">
                                                <i class="fa fa-edit"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>

                                <div class="border rounded-lg p-4 hover:bg-gray-50 transition-colors">
                                    <div class="flex items-start justify-between">
                                        <div class="flex-1">
                                            <div class="flex items-center space-x-2 mb-2">
                                                <span class="text-xs bg-orange-100 text-orange-600 px-2 py-1 rounded-full">填空题</span>
                                                <span class="text-xs bg-yellow-100 text-yellow-600 px-2 py-1 rounded-full">中等</span>
                                            </div>
                                            <p class="text-gray-800 mb-2">集合A = {1, 2, 3}，集合B = {2, 3, 4}，则A ∩ B = _____</p>
                                        </div>
                                        <div class="flex items-center space-x-2 ml-4">
                                            <span class="text-xs text-gray-500">正确率: 78%</span>
                                            <button class="text-gray-400 hover:text-gray-600 transition-colors">
                                                <i class="fa fa-edit"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 右侧：统计和操作面板 -->
                    <div class="space-y-6">
                        <!-- 统计卡片 -->
                        <div class="bg-white rounded-lg shadow-sm border p-6">
                            <h3 class="font-bold text-gray-800 mb-4">学习统计</h3>
                            <div class="space-y-4">
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 bg-primary rounded-full mr-3"></div>
                                        <span class="text-gray-600">今日学习</span>
                                    </div>
                                    <span class="font-bold text-primary">156人</span>
                                </div>
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 bg-secondary rounded-full mr-3"></div>
                                        <span class="text-gray-600">本周学习</span>
                                    </div>
                                    <span class="font-bold text-secondary">1,234人</span>
                                </div>
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 bg-success rounded-full mr-3"></div>
                                        <span class="text-gray-600">掌握率</span>
                                    </div>
                                    <span class="font-bold text-success">85%</span>
                                </div>
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center">
                                        <div class="w-3 h-3 bg-warning rounded-full mr-3"></div>
                                        <span class="text-gray-600">平均用时</span>
                                    </div>
                                    <span class="font-bold text-warning">12分钟</span>
                                </div>
                            </div>
                        </div>

                        <!-- 快速操作 -->
                        <div class="bg-white rounded-lg shadow-sm border p-6">
                            <h3 class="font-bold text-gray-800 mb-4">快速操作</h3>
                            <div class="space-y-3">
                                <button class="w-full flex items-center justify-center px-4 py-3 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                                    <i class="fa fa-play mr-2"></i> 开始练习
                                </button>
                                <button class="w-full flex items-center justify-center px-4 py-3 bg-secondary text-white rounded-lg hover:bg-secondary/90 transition-colors">
                                    <i class="fa fa-book mr-2"></i> 查看资料
                                </button>
                                <button class="w-full flex items-center justify-center px-4 py-3 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors">
                                    <i class="fa fa-share mr-2"></i> 分享给同事
                                </button>
                            </div>
                        </div>

                        <!-- 相关知识点 -->
                        <div class="bg-white rounded-lg shadow-sm border p-6">
                            <h3 class="font-bold text-gray-800 mb-4">相关知识点</h3>
                            <div class="space-y-3">
                                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors cursor-pointer">
                                    <div class="flex items-center">
                                        <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                        <span class="text-sm">集合的表示方法</span>
                                    </div>
                                    <i class="fa fa-arrow-right text-gray-400"></i>
                                </div>
                                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors cursor-pointer">
                                    <div class="flex items-center">
                                        <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                        <span class="text-sm">元素与集合的关系</span>
                                    </div>
                                    <i class="fa fa-arrow-right text-gray-400"></i>
                                </div>
                                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors cursor-pointer">
                                    <div class="flex items-center">
                                        <i class="fa fa-dot-circle-o text-primary mr-2"></i>
                                        <span class="text-sm">子集与真子集</span>
                                    </div>
                                    <i class="fa fa-arrow-right text-gray-400"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <!-- 移动端遮罩 -->
    <div id="sidebar-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-30 lg:hidden hidden"></div>

    <!-- JavaScript -->
    <script>
        // 侧边栏切换
        const sidebarToggle = document.getElementById('sidebar-toggle');
        const sidebar = document.getElementById('sidebar');
        const sidebarOverlay = document.getElementById('sidebar-overlay');

        sidebarToggle.addEventListener('click', () => {
            sidebar.classList.toggle('-translate-x-full');
            sidebarOverlay.classList.toggle('hidden');
        });

        sidebarOverlay.addEventListener('click', () => {
            sidebar.classList.add('-translate-x-full');
            sidebarOverlay.classList.add('hidden');
        });

        // 章节展开/收起
        const chapterItems = document.querySelectorAll('.chapter-item');
        chapterItems.forEach(item => {
            const toggle = item.querySelector('.fa');
            const content = item.querySelector('.pl-6');
            
            item.addEventListener('click', () => {
                const isExpanded = toggle.classList.contains('fa-angle-down');
                
                if (isExpanded) {
                    toggle.classList.remove('fa-angle-down');
                    toggle.classList.add('fa-angle-right');
                    content.classList.add('hidden');
                } else {
                    toggle.classList.remove('fa-angle-right');
                    toggle.classList.add('fa-angle-down');
                    content.classList.remove('hidden');
                }
            });
        });

        // 展开/收起所有
        const expandAll = document.getElementById('expand-all');
        const collapseAll = document.getElementById('collapse-all');

        expandAll.addEventListener('click', () => {
            chapterItems.forEach(item => {
                const toggle = item.querySelector('.fa');
                const content = item.querySelector('.pl-6');
                toggle.classList.remove('fa-angle-right');
                toggle.classList.add('fa-angle-down');
                content.classList.remove('hidden');
            });
        });

        collapseAll.addEventListener('click', () => {
            chapterItems.forEach(item => {
                const toggle = item.querySelector('.fa');
                const content = item.querySelector('.pl-6');
                toggle.classList.remove('fa-angle-down');
                toggle.classList.add('fa-angle-right');
                content.classList.add('hidden');
            });
        });

        // 导航栏滚动效果
        let lastScrollTop = 0;
        const header = document.querySelector('header');
        
        window.addEventListener('scroll', () => {
            const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
            
            if (scrollTop > lastScrollTop && scrollTop > 100) {
                header.style.transform = 'translateY(-100%)';
            } else {
                header.style.transform = 'translateY(0)';
            }
            
            lastScrollTop = scrollTop;
        });
    </script>
</body>
</html> 